from app._init_ import create_app
from app.extensions import db

app = create_app()

with app.app_context():
    try:
        db.create_all()
        print("数据库表创建成功")
    except Exception as e:
        print(f"创建数据库表时出错: {e}")